// import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "@/assets/static/css/global.css";
import "../node_modules/github-markdown-css/github-markdown.css";
// import hljs from "highlight.js";
// import "highlight.js/styles/default.css";
// import "nprogress/nprogress.css";
import "@/assets/static/font/iconfont";

// import moment from "moment";
// 我的默认格式化时间
function myMoment(element, fmt = "YYYY-MM-DD HH:mm:ss") {
  return moment(element).format(fmt);
}
Vue.prototype.$moment = myMoment;

Vue.directive("highlight", function (el) {
  let blocks = el.querySelectorAll("pre code");
  blocks.forEach((block) => {
    hljs.highlightBlock(block);
  });
});

// import "./plugins/element.js";
// import showdown from "showdown";
// Vue.use(showdown);

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
